unit uWinNotice;

interface

uses
  Windows,
  Messages,
  SysUtils,
  Variants,
  Classes,
  Graphics,
  Controls,
  Forms,
  uniGUITypes,
  uniGUIAbstractClasses,
  uniGUIClasses,
  uniGUIForm,
  uniGUIBaseClasses,
  uniMemo,
  uniHTMLMemo;

type
  TWinNotice = class(TUniForm)
    mmo: TUniHTMLMemo;
    procedure UniFormCreate(Sender: TObject);
  private
    { Private declarations }
    fNewsId: Integer;
  public
    { Public declarations }
  published
    property newsId: Integer read fNewsId write fNewsId;
  end;

function WinNotice: TWinNotice;

implementation

{$R *.dfm}

uses
  MainModule,
  uniGUIApplication,
  uDmSys;

function WinNotice: TWinNotice;
begin
  Result := TWinNotice(UniMainModule.GetFormInstance(TWinNotice));
end;

procedure TWinNotice.UniFormCreate(Sender: TObject);
begin
  mmo.text := dbValue('select top 1 newsContent from cms_news where newsntId=0 order by newsId desc',
    []);
end;

end.

